<!-- 左侧导航标题栏 -->
	<div class="col-md-2">
		<div class="panel-group" id="accordion">
			@foreach($list as $k=> $v)
			<div class="panel panel-default" style="margin-top: 0;">
				<div class="panel-heading">
					<a data-toggle="collapse" data-parent="#accordion" href="#collapse_{{$k}}">
						<h3 class="panel-title">
							{{$v['department_name']}}
						</h3>
					</a>
				</div>
				<div id="collapse_{{$k}}" class="panel-collapse collapse in">
					@foreach($v['typelist'] as $vv)
					<a href="javascript:void(0);" onclick="typelist({{$vv['id']}})">
						<div class="panel-body" style="margin-left: 20px;font-size: 14px;border-bottom: 1px dashed #e8e5e5;
							@if($vv['id'] == $handbook->type_id)
								color:#ff4f1b;
							@endif
							">
							{{$vv['type_name']}}
							<span class="glyphicon glyphicon-menu-right" style="float: right;margin-top: 3px;" aria-hidden="true"></span>
						</div>
					</a>
					@endforeach
				</div>
			</div>
			@endforeach
		</div>
	</div>
	<script>
		$(function () {
            var user = JSON.parse(sessionStorage.getItem("users"));
            if(!user){
                window.location.href = '/login';
			}
        });
		function typelist(tid){
			
			if(!user){
			    window.location.href = '/login';
			}else{
                window.location.href = '/handbook?username='+user.username+'&type_id='+tid;
			}
		}

	</script>


